package com.gitee.cashzhang27.test.boot.crypt.plus.controller;

import com.gitee.cashzhang27.test.boot.crypt.plus.entity.User;
import com.gitee.cashzhang27.test.boot.crypt.plus.service.UserService;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/07/10 10:57
 */
@RestController
@RequestMapping("/user")
@AllArgsConstructor
@Api(value = "UserController", description = "用户管理模块")
public class UserController {

  private UserService userService;

  @GetMapping
  public void insert(){
    User user = User.builder()
        .nickName("大娃")
        .gender("男")
        .fullName("水智刚")
        .idCard("33010419990520105X")
        .mobilePhone("18600176548")
        .build();
    userService.save(user);
  }

}
